/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 * Description: op remote update execute.
 * Author: qingjicheng
 * Create: 2023-2-25
 */

#ifndef OP_EMBEDDING_SERVICE_EXECUTOR_H
#define OP_EMBEDDING_SERVICE_EXECUTOR_H

#include "op_executor.h"

namespace hccl {
class OpEmbeddingServiceExecutor : public OpExecutor {
public:
    explicit OpEmbeddingServiceExecutor() = default;
    virtual ~OpEmbeddingServiceExecutor() = default;

    static constexpr u32 PS_SIZE_ONE = 1;

protected:
    inline bool IsCancelSingal(void *signal, u32 size)
    {
        if (size != sizeof(SERVICE_CANCEL_SIGNAL)) {
            return false;
        }
        if (*static_cast<u32 *>(signal) == SERVICE_CANCEL_SIGNAL) {
            return true;
        }
        return false;
    }
};
} // namespace hccl
#endif // OP_EMBEDDING_SERVICE_EXECUTOR_H